<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/25
  Time: 14:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>
    <%
      pageContext.setAttribute("page",1000);
      request.setAttribute("request",2000);
      session.setAttribute("session",3000);
      application.setAttribute("application",4000);
      application.setAttribute("application",5000);
      application.removeAttribute("application");
    %>

<%--  获取作用域中的值--%>
    <h1>${pageScope.page}</h1>
    <h1>${requestScope.request}</h1>
    <h1>${sessionScope.session}</h1>
    <h1>${applicationScope.application}</h1>
   <%-- <%
        //转发
       // request.getRequestDispatcher("test.jsp").forward(request,response);
        //重定向
        response.sendRedirect("test.jsp");
    %>--%>
  </body>
</html>
